/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
 * Author: Huawei OS Kernel Lab
 * Create: Thu Aug 15 16:14:23 2023
 */

#ifndef __LIBLINUX_ASM_SPINLOCK_TYPES_H
#define __LIBLINUX_ASM_SPINLOCK_TYPES_H

#if defined(CONFIG_LIBLINUX_PREEMPT) && defined(CONFIG_LIBLINUX_CDC)
#include_next <asm/spinlock_types.h>
#else
#if !defined(__LINUX_SPINLOCK_TYPES_H) && !defined(__ASM_SPINLOCK_H)
# error "please don't include this file directly"
#endif

typedef struct liblinux_pal_mutex_t arch_spinlock_t;

#define __ARCH_SPIN_LOCK_UNLOCKED LIBLINUX_MUTEX_INITIALIZER

typedef struct liblinux_pal_rwlock_t arch_rwlock_t;

#define __ARCH_RW_LOCK_UNLOCKED RAW_RDLOCK_INITIALIZER

#endif /* CONFIG_LIBLINUX_PREEMPT */
#endif /* __LIBLINUX_ASM_SPINLOCK_TYPES_H */
